package com.vigor.bear.web.constants;

public enum CopyOfResouceType {

	MENU(0, "菜单"), BUTTON(1, "按钮");

	private int index;
	private String name;

	private CopyOfResouceType(int index, String name) {
		this.index = index;
		this.name = name;
	}

	public static String getNameByIndex(int index) {
		for (CopyOfResouceType type : CopyOfResouceType.values()) {
			if(type.index == index){
				return type.name;
			}
		}
		return null;
	}
	
	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
